function [ refitVelData ] = shiftFlowStartTimeToZero( refitVelData )
%UNTITLED Summary of this function goes here

%   If flow velocity does not start at zero in time, this function shifts
%   all time points of the velocity so that it does start at zero (it
%   usually starts a little after zero once smoothing/fitting is performed,
%   and this corrects for that.

if refitVelData(1, 1) ~= 0 %Shifts flow start point to zero if necessary
    offset = refitVelData(1, 1);
    refitVelData(:, 1) = refitVelData(:, 1) - offset;
    
    maxTimeVal = max(refitVelData(:, 1));
    padding = [maxTimeVal + offset, 0];
    
    % Need to account for offset by padding equivalent time on end of
    % waveform
    refitVelData = [refitVelData; padding];
end

end

